﻿using System;
using System.Collections.Generic;
using System.ServiceModel;
using WcfService1.DTO;

namespace WcfService1
{
    // NOTE: You can use the "Rename" command on the "Refactor" PurchaseOrder to change the interface name "IPurchaseOrderServices" in both code and config file together.
    [ServiceContract]
    public interface IPurchaseOrderServices
    {
        [OperationContract]
        List<PurchaseOrderDTO> GetList(int page, out long recordCount, string sortProperty = null,
                                       string sortType = "ASC");

        [OperationContract]
        bool Save(PurchaseOrderDTO PurchaseOrder);

        [OperationContract]
        bool Delete(PurchaseOrderDTO PurchaseOrder);

        [OperationContract]
        List<PurchaseOrderDTO> GetListByCriteria(Dictionary<String, Object> criteria, string expression, int page,
                                                 out long recordCount);

        [OperationContract]
        List<PurchaseOrderDTO> GetAllPurchaseOrder();

        [OperationContract]
        PurchaseOrderDTO GetPurchaseOrder(string PONumber);

        [OperationContract]
        List<PurchaseOrderDTO> GetPurchaseOrderList(string PONumber);

        [OperationContract]
        string GetLastPONo();

        [OperationContract]
        bool DeleteDetail(PurchaseOrderDetailDTO purchaseOrderDetail);

        [OperationContract]
        bool SendEmail(PurchaseOrderDTO purchaseOrder, String DestinationFolder);

        [OperationContract]
        void UpdateStatus(PurchaseOrderDTO purchaseOrder, Status status);
    }
}